const publicApi = {
    //获取组织树
    queryOrg: param => {
        let newParam = {}
        for (const key in param) {
          if (Object.hasOwnProperty.call(param, key)) {
            const element = param[key];
            if (key !== 'orgPath') {
              newParam[key] = element;
            }
          }
        }
        return $http.get(`${window.RPConfig.mgt}/organization/getAuthorizedOrgs?orgPath=${param.orgPath || ''}`, newParam).then(response => response.data);
    },
    // 根据组织编码或名称搜索组织
    getListOrganizationPaths: param => {
        return $http.post(`${window.RPConfig.mgt}/organization/listOrganizationPaths`, param).then(response => response.data);
    },
    // 根据组织编码或名称搜索组织
    getTreeBySelectOrg: param => {
        return $http.get(`${window.RPConfig.mgt}/organization/getTreeBySelectOrg`, param).then(response => response.data);
    }
}
export default publicApi
